 <%@ page contentType="text/html; charset=UTF-8"%>
 <%@ taglib prefix="s" uri="/struts-tags"%>
 <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
 <html>
    <head>
       <link href="
       <s:url value="resources/css/main.css"/>
       " rel="stylesheet" type="text/css"/>
    </head>
    <body>
       <center>

          <table align=center>
               <table width=600 align=center>
                                     <tr>
                                         <td>Item CRUD </td>
                                     </tr>
                                  </table>

          <table>
             <tr>
                <td align="left" style="font:bold;color:red">
                   <s:fielderror/>
                   <s:actionerror/>
                   <s:actionmessage/>
                </td>
             </tr>
          </table>
          <s:form>
             <table align="center" class="borderAll">
                <s:hidden name="item.itemId" />
                <s:hidden name="criteria" value="A0"/>
                <s:hidden name="criteriaSubId" value="1"/>

                <tr>
                   <td class="tdLabel">
                      <s:text name="label.item.itemName"/>
                   </td>
                   <td>
                      <s:textfield name="item.itemName" size="30"/>
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.item.itemDescription"/>
                   </td>
                   <td>
                      <s:textfield name="item.itemDescription" size="30"/>
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.item.quantityInStock"/>
                   </td>
                   <td>
                       <s:textfield name="item.quantityInStock" size="10" />
                   </td>
                </tr>
                <tr>
                   <td class="tdLabel">
                      <s:text name="label.item.price"/>
                   </td>
                   <td>
                       <s:textfield name="item.price" size="10" />
                   </td>
                </tr>


                <tr>
                   <td class="tdLabel">
                      <s:text name="label.item.suppliers"/>
                   </td>
                   <td>
                      <s:select name="item.supplierIdList"
                         list="#session.supplierIdList"
                         headerKey=""
                         headerValue=""
                         multiple="true"
                         />
                   </td>
                </tr>

             </table>
             <br/>
             <table>
                <tr>
                   <td>

                       <s:if test="item==null || item.itemId == null">
                         <s:submit action="itemCRUD" key="button.label.submit" cssClass="butStnd"/>
                      </s:if>
                      <s:else>
                        <s:submit action="itemUpdate" key="button.label.submit" cssClass="butStnd"/>
                      </s:else>

                   </td>
                   <td>
                      <s:reset key="button.label.cancel" cssClass="butStnd" action="itemInsertOrUpdate" />
                   </td>
                <tr>
             </table>
          </s:form>
       </center>
    </body>
 </html>